package models

import (
	"github.com/astaxie/beego/orm"
	// _ "github.com/go-sql-driver/mysql"
	_ "github.com/lib/pq"
)

func InitDb() {
	// orm.RegisterDataBase("default", "mysql", "root:@tcp(127.0.0.1:3306)/lara?charset=utf8", 30)
	orm.RegisterDataBase("default", "postgres", "user=postgres password=o dbname=laral host=127.0.0.1 port=5432 sslmode=disable")
	orm.RegisterModel(&User{})
	orm.RunSyncdb("default", false, true)
}
